package com.noname.lib_base_java.mvp;

import com.noname.lib_base_java.entity.FielBean;
import com.noname.lib_base_java.entity.NetFielBean;
import com.noname.lib_base_java.net.download.DownloadInfo;
import com.noname.lib_base_java.net.download.DownloadManager;

import java.util.List;

import io.reactivex.Observable;
import io.reactivex.Observer;
import okhttp3.ResponseBody;

/**
 * @author:Lmoumou
 * @date:2018/12/9 描述:
 **/
public interface BaseContract {

    interface BaseModel {

        void doHttp(Observer<ResponseBody> observer, Observable<ResponseBody> observable);


        /**
         * 单个文件上传
         */
        void mUpLoadFiel(Observer<ResponseBody> observer, FielBean fielBean);

        /**
         * 多个文件上传
         */
        void mUpLoadFiel(Observer<ResponseBody> observer, List<FielBean> fielList);

        void mDownload(Observer<DownloadInfo> observer, DownloadInfo info, DownloadManager.ProgressListener progressObserver);

        void mPause();
    }

    interface BasePresenter {
        /**
         * 解绑View
         */
        void detachView();

        /**
         * 单个上传文件
         */
        void pUpLoadFiel(FielBean fielBean);

        void pUpLoadFiel(List<FielBean> fielList);

        void pDownload(DownloadInfo info, DownloadManager.ProgressListener progressObserver);

        void pPause();
    }

    interface BaseView {
        /**
         * 网络错误
         */
        void onNetError(String msg);

        /**
         * 未登录
         */
        void onNoLogin();

        /**
         * 报提示
         */
        void doPrompt(String msg);

        /**
         * 显示加载弹窗
         */
        void showLoadDialog();

        /**
         * 隐藏加载弹窗
         */
        void hideLoadDialog();

        /**
         * 显示空布局
         */
        void showEmpty();

        /**
         * 显示内容布局
         */
        void showContent();

        /**
         * 上传多个图片回调
         */
        void upLoadFiels(List<NetFielBean> fielBeens);

        /**
         * 上传图片失败
         */
        void upLoadFielsFail(String failMsg);

        void vDownload(DownloadInfo info);

        void vDownloadFail(String msg);
    }

}
